module.exports = {
  configureWebpack: {
    resolve: {
      alias: {
        assets: "@/assets",
        img: "@/assets/images",
      },
    },
  },
  // 公共路径(必须有的)
  publicPath: "./",
  outputDir: "dist",
  devServer: {
    // 跨域处理
    open: true,
    host: "localhost",
    port: "8081",
    https: false,
    proxy: {
      "/api": {
        // target: "http://whfc.cc:8080/", // 要请求的地址
        target: "http://localhost:8080/", // 要请求的地址
        ws: true,
        changeOrigin: true,
        pathRewrite: {
          "^/api": "",
        },
      },
    },
  },
};
